package com.ruoyi.receipt.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.receipt.mapper.TbUserCaAppealMapper;
import com.ruoyi.receipt.domain.TbUserCaAppeal;
import com.ruoyi.receipt.service.ITbUserCaAppealService;

/**
 * 用户密保申诉Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-03-30
 */
@Service
public class TbUserCaAppealServiceImpl implements ITbUserCaAppealService 
{
    @Autowired
    private TbUserCaAppealMapper tbUserCaAppealMapper;

    /**
     * 查询用户密保申诉
     * 
     * @param id 用户密保申诉ID
     * @return 用户密保申诉
     */
    @Override
    public TbUserCaAppeal selectTbUserCaAppealById(Long id)
    {
        return tbUserCaAppealMapper.selectTbUserCaAppealById(id);
    }

    /**
     * 查询用户密保申诉列表
     * 
     * @param tbUserCaAppeal 用户密保申诉
     * @return 用户密保申诉
     */
    @Override
    public List<TbUserCaAppeal> selectTbUserCaAppealList(TbUserCaAppeal tbUserCaAppeal)
    {
        return tbUserCaAppealMapper.selectTbUserCaAppealList(tbUserCaAppeal);
    }

    /**
     * 新增用户密保申诉
     * 
     * @param tbUserCaAppeal 用户密保申诉
     * @return 结果
     */
    @Override
    public int insertTbUserCaAppeal(TbUserCaAppeal tbUserCaAppeal)
    {
        tbUserCaAppeal.setCreateTime(DateUtils.getNowDate());
        return tbUserCaAppealMapper.insertTbUserCaAppeal(tbUserCaAppeal);
    }

    /**
     * 修改用户密保申诉
     * 
     * @param tbUserCaAppeal 用户密保申诉
     * @return 结果
     */
    @Override
    public int updateTbUserCaAppeal(TbUserCaAppeal tbUserCaAppeal)
    {
        tbUserCaAppeal.setUpdateTime(DateUtils.getNowDate());
        return tbUserCaAppealMapper.updateTbUserCaAppeal(tbUserCaAppeal);
    }

    /**
     * 批量删除用户密保申诉
     * 
     * @param ids 需要删除的用户密保申诉ID
     * @return 结果
     */
    @Override
    public int deleteTbUserCaAppealByIds(Long[] ids)
    {
        return tbUserCaAppealMapper.deleteTbUserCaAppealByIds(ids);
    }

    /**
     * 删除用户密保申诉信息
     * 
     * @param id 用户密保申诉ID
     * @return 结果
     */
    @Override
    public int deleteTbUserCaAppealById(Long id)
    {
        return tbUserCaAppealMapper.deleteTbUserCaAppealById(id);
    }
}
